import request from '@/utils/request'

// 根据路由和学期编号获取公共信息
export function getAllRanking(flist, slist, tlist, sendSemseterId) {
  return request({
    url: 'PublicInfo/getRouterAndPublicInfo',
    method: 'GET',
    params: {
      flistId: flist,
      slistId: slist,
      tlistId: tlist,
      sendSemseterId: sendSemseterId
    }
  })
}
// 根据路由和学期编号获取公共信息姓名模糊查询
export function searchUserInfomations(userName) {
  var flist = sessionStorage.getItem('flist')
  var slist = sessionStorage.getItem('slist')
  var tlist = sessionStorage.getItem('tlist')
  var sendSemseterId = sessionStorage.getItem('semId')
  return request({
    url: '/PublicInfo/getRouterAndPublicInfoName',
    method: 'GET',
    params: {
      flistId: flist,
      sendSemseterId: sendSemseterId,
      slistId: slist,
      tlistId: tlist,
      userName: userName
    }
  })
}

// 获取当前系统时间
export function getSystemTime() {
  return request({
    url: 'PublicInfo/getSystemTime',
    method: 'GET'
  })
}

// 根据路由类型获取信息
export function getListType(type) {
  return request({
    url: 'PublicInfo/getListByType',
    method: 'GET',
    params: {
      type: type
    }
  })
}
